package com.xiaoyu.lanling.media.image.fresco

import com.facebook.cache.common.CacheKey
import com.facebook.imagepipeline.cache.DefaultCacheKeyFactory
import com.facebook.imagepipeline.request.ImageRequest

class CacheKeyFactory : DefaultCacheKeyFactory() {
    override fun getBitmapCacheKey(request: ImageRequest, callerContext: Any?): CacheKey? {
        return BitmapMemoryCacheKey(
            getCacheKeySourceUri(request.sourceUri).toString(),
            request.resizeOptions,
            request.rotationOptions,
            request.imageDecodeOptions,
            null,
            null,
            callerContext)
    }
}